<template>
    <!-- 医嘱复核 -->
    <div class="app-container">

        <div id="left">

            <el-select v-model="value" placeholder="请选择" class="left-select">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>

            <div class="left-search">
                <el-select v-model="value" placeholder="全部">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
                <el-input v-model="input" placeholder="床号/姓名/住院号" />
                <el-button type="primary" size="mini">查询</el-button>
            </div>

            <el-table :data="tableData" style="width: 100%" class="left-table" highlight-current-row
                :header-cell-style="{ background: '#eef1f6', color: '#606266' }">
                <el-table-column prop="bedNo" label="床号" />
                <el-table-column prop="name" label="姓名">
                    <template #default="{ row }">
                        {{ row.name }}
                        <span class="checkIcon">核</span>
                    </template>
                </el-table-column>
            </el-table>

        </div>

        <div id="right">
            <div class="head-container">
                <div>
                    <div>床号<strong>7A05</strong></div>
                </div>
                <div>
                    <strong>易烊千玺</strong>
                    <el-button type="danger" plain size="mini">自费</el-button>
                </div>
                <div>住院号:<strong>625798</strong>
                </div>
                <div>入院如期:<strong>2023-12-12 15:15:15</strong>
                </div>
                <div>入院天数:<strong>5天</strong></div>
                <div>主治医生:<strong>张元成</strong></div>
            </div>

            <div class="right-top">

                <div class="right-filter">
                    <div class="yzlb">
                        <strong>医嘱列表</strong>
                    </div>
                    <div><el-button type="primary" size="mini">医嘱复核</el-button></div>
                    <el-select v-model="value" placeholder="未复核" class="left-select width-100">
                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                    <el-input v-model="input" placeholder="项目名称" class="width-200" />
                    <div>
                        <el-date-picker v-model="value1" type="daterange" range-separator=":" start-placeholder="开始日期"
                            end-placeholder="结束日期" class="width-230" />
                    </div>

                    <el-button type="primary" size="mini">查询</el-button>
                </div>

                <el-table :data="tableData" style="width: 100%" height="330" class="left-table" highlight-current-row
                    :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
                    @selection-change="handleSelectionChange">
                    <el-table-column type="selection" width="55" />
                    <el-table-column prop="bedNo" label="序号" />
                    <el-table-column prop="name" label="医嘱开立时间" />
                    <el-table-column prop="name" label="状态" />
                    <el-table-column prop="name" label="项目名称" />
                    <el-table-column prop="name" label="医保信息" />
                    <el-table-column prop="name" label="疗程" />
                    <el-table-column prop="name" label="疗程次数" />
                    <el-table-column prop="name" label="频次" />
                    <el-table-column prop="name" label="单次数量" />
                    <el-table-column prop="name" label="单位" />
                </el-table>
            </div>

            <div class="right-down">

                <div class="right-filter">
                    <div class="yzlb">
                        <strong>医嘱计划</strong>
                    </div>
                </div>

                <el-table :data="tableData" style="width: 100%" height="330" class="left-table" highlight-current-row
                    :header-cell-style="{ background: '#eef1f6', color: '#606266' }">
                    <el-table-column prop="bedNo" label="序号" />
                    <el-table-column prop="name" label="项目名称" />
                    <el-table-column prop="name" label="频次" />
                    <el-table-column prop="name" label="单次数量" />
                    <el-table-column prop="name" label="单位" />
                    <el-table-column prop="name" label="计划时间" />
                </el-table>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            options: [{
                value: '选项1',
                label: '黄金糕'
            }, {
                value: '选项2',
                label: '双皮奶'
            }, {
                value: '选项3',
                label: '蚵仔煎'
            }, {
                value: '选项4',
                label: '龙须面'
            }, {
                value: '选项5',
                label: '北京烤鸭'
            }],
            value: '',
            input: '',
            value1: '',
            tableData: [{
                bedNo: '2016-05-02',
                name: '王小虎'
            }, {
                bedNo: '2016-05-04',
                name: '王小虎'
            }, {
                bedNo: '2016-05-01',
                name: '王小虎'
            }, {
                bedNo: '2016-05-03',
                name: '王小虎'
            }]
        }
    },
    methods: {
        // 右边表格勾选是的钩子
        handleSelectionChange() {

        }
    }
}

</script>

<style lang='scss' scoped>
.app-container {
    display: flex;
    background-color: #fff;
    padding-bottom: 0;

    .width-100 {
        width: 100px;
    }

    .width-150 {
        width: 150px;
    }

    .width-180 {
        width: 180px;
    }

    .width-200 {
        width: 200px;
    }

    .width-230 {
        width: 230px;
    }

    #left {
        width: 300px;
        height: 100%;
        margin: 0 10px 10px 0;

        .left-select {
            width: 100%;
            margin-bottom: 10px;
        }

        .left-search {
            display: flex;
            align-items: center;
            margin-bottom: 10px;

            .el-input {
                margin: 0 5px;
            }
        }

        .checkIcon {
            display: inline-block;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: red;
            color: #fff;
            text-align: center;
            line-height: 20px;
            margin-left: 20px;
        }

    }

    #right {
        flex: 1;
        height: 100%;
        margin-bottom: 10px;

        box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);

        .head-container {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: start;
            height: 48px;
            padding: 0 5px;
            margin-bottom: 10px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
        }

        .head-container>div {
            margin: 0 15px;
        }

        .right-top,
        .right-down {
            .right-filter {
                height: 32px;
                display: flex;
                align-items: center;
                flex-wrap: wrap;
                justify-content: start;
                margin-bottom: 10px;
                padding-left: 10px;
            }

            .right-filter>div {
                margin-right: 10px;
            }
        }

        .right-top {
            margin-bottom: 10px;
        }

    }

}
</style>
